<body class="gray-bg">
<div class="wrapper wrapper-content animated ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{$page_title}</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <form id="pagerForm" method="post" class="form-inline searchForm">
                            <div class="col-sm-3 m-b-xs">
                                <lqf_link><a class="btn btn-info ajax-open"  data-url="{:url('MaterialShelves/add')}"><i class="fa fa-plus"></i> 添加</a></lqf_link>
                            </div>
                            <div class="col-sm-9 m-b-xs text-right">
                                <div class="input-group">
                                    <input type="text" name="keywords" placeholder="输入关键字搜索" class="form-control">
                                </div>
                                <div class="input-group">
                                    <span class="input-group-btn"> <button type="button" class="btn btn-primary ajaxSearchForm"><i class="fa fa-search"></i> 搜索</button></span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="ibox-content table-responsive">
                    <table class="table table-hover sorttable ajax-list-table" data-url="{:url('MaterialShelves/show_json')}" width="100%">
                        <thead>
                        <tr>
                            <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                            <th width="120"><span>货架名称</span></th>
                            <th width="120"><span>货架编码</span></th>
                            <th width="200"><span>所在仓库</span></th>
                            <th width="100" orderField="by_sort" class="sort-filed"><span>排序</span></th>
                            <th width="80" class="text-center">启用</th>
                            <th width="80" class="text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                        <tfoot class="ibox-content">
                        <tr>
                            <td colspan="5" align="center"></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="tableListTpl" type="text/html">
    <% for(var i=0;i<data.length;i++) {
        visible='';
        if(data[i]['visible']=='1') visible='checked';
    %>
    <tr>
        <td><input name="id" class="checkboxCtrlId" value="<%=data[i]['id']%>" type="checkbox"></td>
        <td><%=data[i]['name']%></td>
        <td><%=data[i]['identity_code']%></td>
        <td><%=data[i]['store_name']%></td>
        <td>
            <input type="text" name="sort" value="<%=data[i]['sort']%>" class="form-control w50 ajax-sort" data-url="{:url('MaterialShelves/set_sort',array('name'=>'sort'))}" data-id="<%=data[i]['id']%>" size="5">
        </td>
        <td class="text-center">
            <input name="visible" class="ajax-checkbox" type="checkbox"   data-url="{:url('MaterialShelves/set_visible',array('name'=>'visible'))}"  data-id="<%=data[i]['id']%>" <%=visible%> >
        </td>
        <td class="text-center">
            <lqf_link><a class="ajax-open" data-url="{:url('MaterialShelvesCell/show')}"  data-ids="{'id':'<%=data[i]['id']%>'}" data-title="格子">格子</a></lqf_link>
            <lqf_link><a class="ajax-open" data-url="{:url('MaterialShelves/edit')}"  data-ids="{'id':'<%=data[i]['id']%>'}" data-title="修改">修改</a></lqf_link>
            <lqf_link><a class="ajax-del confirm" data-url="{:url('MaterialShelves/del')}" data-ids="{'id':'<%=data[i]['id']%>'}">删除</a></lqf_link>
        </td>
    </tr>
    <% } %>
</script>
<script type="text/javascript">
    $(document).ready(function () {
        turnPage(1);//页面加载时初始化分页
    });
</script>
